package com.hsd.znsh.service;

import com.hsd.znsh.entity.Sensor;
import com.hsd.znsh.entity.SensorType;
import com.hsd.znsh.entity.User;
import com.hsd.znsh.pojo.output.SensorVO;
import com.hsd.znsh.pojo.query.SensorInfoQuery;
import com.hsd.znsh.pojo.query.SensorQuery;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface SensorService extends BaseService{

    long getSensorListTotalPages(SensorQuery sensorQuery,Integer userId);

    List<SensorVO> getSensorList(SensorQuery sensorQuery,Pageable pageable,Integer userId);

    SensorVO getSensorInfo(Integer id);

    SensorVO getSensorInfoBySensorSn(String sensorSn);

    Sensor addSensor(Sensor sensor);

    Sensor updateSensor(Sensor sensor);

    Sensor addSensorByAppUser(Sensor sensor, User user);

    Sensor updateSensorByAppUser(Sensor sensor, User user);

    Sensor deleteSensor(Integer id);

    Sensor deleteSensor(String sensorSn);

    Map<String,Object> getSensorAverageValueByHostSn(String hostSn,Integer sensorTypeId,Integer bh);

    List<Sensor> getSensorListByHostSn(String hostSn);

    SensorType getSensorTypeBySensorSn(String sensorSn);

    List<Sensor> getSensorListByAppUser(User user);

}
